#项目编译环境
win32:msvc {
    SYSTEM_PATH = msvc
}

win32:mingw {
    SYSTEM_PATH = mingw
}

unix {
    SYSTEM_PATH = linux
}

#编译模式
CONFIG(debug, debug|release): CONFIG_PATH = debug
CONFIG(release, debug|release): CONFIG_PATH = release

#生成路径
contains(TEMPLATE, app) {
    DESTDIR = $$PWD/bin/$$TARGET/$$CONFIG_PATH/$$SYSTEM_PATH
}
contains(TEMPLATE, lib) {
    #配置仅编译生成一个SO
    unix:CONFIG += plugin
    #库生成路径
    DESTDIR = $$PWD/bin/plugin/$$CONFIG_PATH/$$SYSTEM_PATH
    #具体项目名
    contains(PROJECT_NAME, $$PROJECT_NAME) {
        DESTDIR = $$PWD/bin/$$PROJECT_NAME/$$CONFIG_PATH/$$SYSTEM_PATH
    }
}

#message(DESTDIR : $$DESTDIR)

#中间文件路径
MOC_DIR = $$PWD/temp/$$TARGET/.moc
RCC_DIR = $$PWD/temp/$$TARGET/.rcc
UI_DIR = $$PWD/temp/$$TARGET/.ui
OBJECTS_DIR = $$PWD/temp/$$TARGET/.obj

#关闭编译自动产生的debug和release文件夹
CONFIG -= debug_and_release

#消除QVariant编译警告
unix {
    QMAKE_CXXFLAGS+=-Wno-deprecated-copy
    QMAKE_CXXFLAGS += -Wno-class-memaccess
}
